package org.esk.dablog.web.modules;

import org.esk.dablog.modules.Module;
import org.esk.dablog.service.EntryManager;
import org.esk.dablog.service.UserManager;
import org.esk.dablog.web.elements.CalendarBean;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Calendar;

/**
 * This class implements Calendar Module backend
 * User: esk
 * Date: Dec 3, 2006
 * Time: 6:09:35 PM
 * $Id:$
 */
public class UsersModule implements Module {
    public static final String USERS_BEAN_PROPERTY = "__module__users__bean";
    /**
     * how much users to load
     */
    private static final int USERS_COUNT = 5;

    private UserManager userManager;


    public void initialize(String name, String prefix, HttpServletRequest request) {
        request.setAttribute(USERS_BEAN_PROPERTY, userManager.listLastRegisteredUsers(USERS_COUNT));
    }



    public void setUserManager(UserManager userManager) {
        this.userManager = userManager;
    }
}
